<template>
  <div class="default-title">{{ titleMsg }}</div>
</template>

<script lang="ts" setup>
  import { ReportData, ReportConfig } from '@/pages/scale/utils/scale.type';
  import { computed, PropType, toRefs } from 'vue';

  const props = defineProps({
    reportData: {
      type: Object as PropType<ReportData>,
      default: () => ({
        scaleInfo: {},
        companyInfo: {},
        userInfo: {},
        record: [],
        demensions: [],
      }),
    },
    reportConfig: {
      type: Object as PropType<ReportConfig>,
      default: () => {},
    },
  });

  const { reportData, reportConfig } = toRefs(props);

  const titleMsg = computed(() => {
    return reportConfig.value.config.title ? reportConfig.value.config.title : reportData.value.scaleInfo.nameCN + '量表心理测评报告';
  });
</script>

<style lang="scss">
  .default-title {
    height: 60px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    line-height: 60px;
  }
</style>
